package stack;


/**
 * @author Jonny Long
 * @date 2021/2/7 21:20
 */
public class Solution1598 {
    public int minOperations(String[] logs) {
        int step=0;
        for (String s:logs) {
            if ("../".equals(s)){
                if (step!=0){
                    step--;
                }
            }else if ("./".equals(s)){
                continue;
            } else if (s.charAt(s.length()-1)=='/'){
                step++;
            }
        }
        System.out.println(step);
        return step;
    }
}
